<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta name="author" content="Yb">
    <title>记住密码提示</title>
    <style>
        html,body{
            height: 100%;
            font-family: 'Microsoft YaHei';
        }
        form{
            font-size: 14px;
            position: relative;
        }
        div.cue{
            width: 200px;
            border: 1px solid #ff9a00;
            background-color: #ffefa0;
            padding: 5px;
            margin-left: 5px;
            position: absolute;
            top: 22px;
            left: 0;
            opacity: 0;
        }
    </style>
</head>

<body>
    <form action="">
        <input type="checkbox">两周内自动登录
        <div class="cue">为了您的信息安全请不要再网吧或公用电脑上使用此功能！</div>
    </form>
</body>

</html>
<script>
    var input = document.querySelector('form input');
    console.log(typeof input);
    var cue = document.querySelector('div.cue');
    input.onmouseover = function(){
        cue.style.opacity = '1';
        input.onmouseout = function(){
            cue.style.opacity = '0';
        }
    }
</script>